﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Model
{
    //事件包，同时包含对应事件在同类事件中的处理优先级
    public class EventPackage:IComparable
    {
        //优先级
        public int priority { get; }
        public Action<int[], object[]> action { get; }

        public EventPackage(int priority,Action<int[],object[]> action)
        {
            this.priority = priority;
            this.action = action;
        }
        //从大到小排序
        public int CompareTo(object obj)
        {
            return -priority.CompareTo((obj as EventPackage).priority);
        }
    }
}
